**************************************************************************
* REPLICATION DATA & CODE                                                *
* PAPER TITLE: When You Breath and Your Heart Breaks:                    *
* Air Pollution, Environmental Awareness, and Political Trust in China   *
* AUTHER: Chin-en Wu, Terry Chih-sung Teng, Chelsea C. Chou, K.C. LEE    *
* DATE: 2024/01/12                                                       *
* UPDATE: 2024/04/23                                                     *
**************************************************************************
 
* Table 1. Air Pollution, Environmental Awareness, and Political Trust *
* MODEL 1
xtreg lgovtrust c.aware_pcf##i.pollution age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
* MODEL 2
meqrlogit lgovtrust_2 c.aware_pcf##i.pollution age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
* MODEL 3
xtreg lgovtrust c.aware_pcf##c.aqi_day2015 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
* MODEL 4
meqrlogit lgovtrust_2 c.aware_pcf##c.aqi_day2015 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:


* Figure 4. Marginal Effects of Environmental Awareness and Air Pollution (measured as a dichotomous variable) on the Trust in the Local Government *
* (a) Model 1 (Continuous DV)
xtreg lgovtrust c.aware_pcf##i.pollution age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
* Upper Left
margins, dydx(aware_pcf) by(pollution)
marginsplot, yline(0)
* Lower Left
margins, dydx(pollution) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)
* (b) Model 2 (Dichotomous DV)
meqrlogit lgovtrust_2 c.aware_pcf##i.pollution age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
* Upper Right
margins, dydx(aware_pcf) by(pollution)
marginsplot, yline(0)
* Lower Right
margins, dydx(pollution) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)

* Figure 5. Marginal Effects of Environmental Awareness and AQI (measured as a continuous variable) on Trust in the Local Government *
* (a)Model 3 (Continuous DV)
xtreg lgovtrust c.aware_pcf##c.aqi_day2015 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
* Upper Left
margins, dydx(aware_pcf) at(aqi_day2015=(40(10)120))
marginsplot, yline(0)
* Lower Left
margins, dydx(aqi_day2015) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)
* (b) Model 4 (Dichotomous DV)
meqrlogit lgovtrust_2 c.aware_pcf##c.aqi_day2015 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
* Upper Right
margins, dydx(aware_pcf) at(aqi_day2015=(40(10)120))
marginsplot, yline(0)
* Lower Right
margins, dydx(aqi_day2015) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)

* Table 2. Models for Robustness Check
* Model 1. County’s geographical center (continuous dv)
xtreg lgovtrust c.aware_pcf##c.AQI_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
* Model 2. County’s geographical center (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##c.AQI_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
* Model 3. Daytime AQI (continuous dv)
xtreg lgovtrust c.aware_pcf##c.AQIday_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
* Model 4. Daytime AQI (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##c.AQIday_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
* Model 5. Rush hour AQI (continuous dv)
xtreg lgovtrust c.aware_pcf##c.AQIrush_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
* Model 6. Rush hour AQI (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##c.AQIrush_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
* Model 7. Cut-off point = 100 (continuous dv)
xtreg lgovtrust c.aware_pcf##i.pollution_2 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
* Model 8. Cut-off point = 100 (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##i.pollution_2 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:


* Figure 6. Marginal Effects from Robustness Check
* (1) County’s geographical center (continuous dv)
xtreg lgovtrust c.aware_pcf##c.AQI_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
margins, dydx(aware_pcf) at(AQI_ave=(40(10)120))
marginsplot, yline(0)
* (2) County’s geographical center (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##c.AQI_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
margins, dydx(aware_pcf) at(AQI_ave=(40(10)120))
marginsplot, yline(0)
* (3) Daytime AQI (continuous dv)
xtreg lgovtrust c.aware_pcf##c.AQIday_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
margins, dydx(aware_pcf) at(AQIday_ave=(40(10)120))
marginsplot, yline(0)
* (4) Daytime AQI (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##c.AQIday_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
margins, dydx(aware_pcf) at(AQIday_ave=(40(10)120))
marginsplot, yline(0)
* (5) Rush hour AQI (continuous dv)
xtreg lgovtrust c.aware_pcf##c.AQIrush_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
margins, dydx(aware_pcf) at(AQIrush_ave=(40(10)120))
marginsplot, yline(0)
* (6) Rush hour AQI (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##c.AQIrush_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
margins, dydx(aware_pcf) at(AQIrush_ave=(40(10)120))
marginsplot, yline(0)
* (7) Cut-off point = 100 (continuous dv)
xtreg lgovtrust c.aware_pcf##i.pollution_2 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
margins, dydx(aware_pcf) by(pollution)
marginsplot, yline(0)
* (8) Cut-off point = 100 (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##i.pollution_2 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
margins, dydx(aware_pcf) by(pollution)
marginsplot, yline(0)

* Appendix 1. Environmental Awareness Factor Analysis 
factor C11 C1C imp, pcf
rotate

* Appendix 2. Air Pollution, Environmental Awareness, and Trust in Central Government
* Table
* Appendix Model 1. Trust in central gov’t (continuous dv)
xtreg cgovtrust c.aware_pcf##i.pollution age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
margins, dydx(aware_pcf) by(pollution)
marginsplot, yline(0)
* Appendix Model 2. Trust in central gov’t (dichotomous dv)
meqrlogit cgovtrust_2 c.aware_pcf##i.pollution age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
margins, dydx(aware_pcf) by(pollution)
marginsplot, yline(0)
* Appendix Model 3. Trust in central gov’t (continuous dv)
xtreg cgovtrust c.aware_pcf##c.aqi_day2015 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
margins, dydx(aware_pcf) at(aqi_day2015=(40(10)120))
marginsplot, yline(0)
* Appendix Model 4. Trust in central gov’t (dichotomous dv)
meqrlogit cgovtrust_2 c.aware_pcf##c.aqi_day2015 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
margins, dydx(aware_pcf) at(aqi_day2015=(40(10)120))
marginsplot, yline(0)

* Appendix 3. The Marginal Effects of Different AQI Measurements on Political Trust Based on the Degree of Environmental Awareness
* (1) County’s geographical center (continuous dv)
xtreg lgovtrust c.aware_pcf##c.AQI_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
margins, dydx(AQI_ave) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)
* (2) County’s geographical center (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##c.AQI_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
margins, dydx(AQI_ave) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)
* (3) Daytime AQI (continuous dv)
xtreg lgovtrust c.aware_pcf##c.AQIday_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
margins, dydx(AQIday_ave) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)
* (4) Daytime AQI (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##c.AQIday_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
margins, dydx(AQIday_ave) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)
* (5) Rush hour AQI (continuous dv)
xtreg lgovtrust c.aware_pcf##c.AQIrush_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
margins, dydx(AQIrush_ave) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)
* (6) Rush hour AQI (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##c.AQIrush_ave age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
margins, dydx(AQIrush_ave) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)
* (7) Cut-off point = 100 (continuous dv)
xtreg lgovtrust c.aware_pcf##i.pollution_2 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita, i(GbCounty) mle
margins, dydx(pollution) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)
* (8) Cut-off point = 100 (dichotomous dv)
meqrlogit lgovtrust_2 c.aware_pcf##i.pollution_2 age edu A1 A2 economy_cou economy_fam dSE9 A2015city_percapita || GbCounty:
margins, dydx(pollution) at(aware_pcf=(-2.5(0.2)2.5))
marginsplot, yline(0)

